// 实例化vue对象
new Vue({
    el: "#vue-app",
    data: {
        health: 100,//100-进度条的进度,即folder的耐久度..
        ended: false //folder是否已经被打破
    },
    methods: {
        //点击"敲击"
        punch: function () {
            this.health -= 10;
            if (this.health <= 0) {
                this.ended = true;
            }
        },
        //点击"重新开始"
        restart: function () {
            this.health = 100;
            this.ended = false;
        }
    }
});